import {Component, OnInit} from '@angular/core';

@Component({
  selector: 'app-stock-manger',
  templateUrl: './stock-manger.component.html',
  styleUrls: ['./stock-manger.component.css']
})
export class StockMangerComponent implements OnInit {
  private Stocks: Array<Stock>;

  constructor() {
  }

  ngOnInit() {
    this.Stocks = [
      new Stock(1, "第0只狗", 1.1, 2.5, "小明的狗1", ["aaa", "bbbb"]),
      new Stock(2, "第1只狗", 1.1, 2.5, "小明的狗2", ["aaa", "bbbb"]),
      new Stock(3, "第2只狗", 1.1, 2.5, "小明的狗3", ["aaa", "bbbb"]),
      new Stock(4, "第3只狗", 1.1, 2.5, "小明的狗4", ["aaa", "bbbb"]),
      new Stock(5, "第4只狗", 1.1, 2.5, "小明的狗5", ["aaa", "bbbb"]),
      new Stock(6, "第5只狗", 1.1, 2.5, "小明的狗6", ["aaa", "bbbb"]),
      new Stock(7, "第6只狗", 1.1, 2.5, "小明的狗7", ["aaa", "bbbb"])
  ];
  }

}
export class Stock {
  constructor(public id: number,
              public name: string,
              public price: number,
              public rating: number,
              public desc: string,
              public categories: Array<string>) {

  }
}
